class CreateGroupTeachers < ActiveRecord::Migration
  def self.up
    create_table :group_teachers do |t|
      t.references :group
      t.references :teacher
      t.boolean :is_headliner

      t.timestamps
    end
    add_index(:group_teachers, [:group_id, :teacher_id], :unique => false)
  end

  def self.down
    remove_index(:group_teachers, :column => [:group_id, :teacher_id])
    drop_table :group_teachers
  end
end
